//How to find a first non repeating character in a String ?
public class Q7 {
	static public char firstC(String s) {
		char[] cs = s.toCharArray();
		for (int i = 0; i < cs.length; i++) {
			int flag = 0;
			for (int j = 0; j < cs.length; j++) {
				if (cs[i] == cs[j]) {
					flag++;
				}
				if (flag > 2) {
					break;
				}
			}
			if (flag == 1) {
				return cs[i];
			}
		}
		return 0;
	}

	public static void main(String[] args) {
		String s = "sadjkwedfks";
		System.out.println(Q7.firstC(s));
	}
}
